package com.dayuanit.exception;

/**
 * 业务异常
 */
public class BusinessException extends RuntimeException{


    /**
     * 错误描述
     */
    private String exMsg;


    /**
     * 错误码
     */
    private Integer exCode;



    public BusinessException() {
        super();
    }


    public BusinessException(Integer exCode, String exMsg) {
        super();
        this.exCode = exCode;
        this.exMsg = exMsg;
    }

    public BusinessException(BusinessEnum businessEnum) {
        super();
        this.exCode = businessEnum.getCode();
        this.exMsg = businessEnum.getMsg();
    }

    public String getExMsg() {
        return exMsg;
    }

    public void setExMsg(String exMsg) {
        this.exMsg = exMsg;
    }

    public Integer getExCode() {
        return exCode;
    }

    public void setExCode(Integer exCode) {
        this.exCode = exCode;
    }
}
